home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / SHARED.DIR / 03146_Script_PRINT ALL CARDS 2 < prev    next >
Text File  |  1996-04-01  |  3KB  |  81 lines

  1. -- -----------------------------------------------------------
  2. -- Handler doPrintAllCards 
  3. -- THIS VERSION PRINTS THEM USING THE FILE NAMES
  4.  
  5. on doPrintAllCards filePathName
  6.   printAllCardsOnePage(filePathName, "alarm.pic", "artill.pic", "ball.pic", "Bell.pic")
  7.   printAllCardsOnePage(filePathName, "Bellto.pic", "bicycle.pic", "bobbin.pic", "Bomb.pic")
  8.   printAllCardsOnePage(filePathName, "Bridge.pic", "Cannon.pic", "compass.pic", "Crossb.pic")
  9.   printAllCardsOnePage(filePathName, "diving.pic", "Drawbr.pic", "Dredge.pic", "drill.pic")
  10.   printAllCardsOnePage(filePathName, "Drums.pic", "Drums2.pic", "Drums3.pic", "filemake.pic")
  11.   printAllCardsOnePage(filePathName, "fortre.pic", "Gun.pic", "helico.pic", "joint.pic")
  12.   printAllCardsOnePage(filePathName, "landin.pic", "lifepr.pic", "metalrol.pic", "Missile.pic")
  13.   printAllCardsOnePage(filePathName, "paddle.pic", "parach.pic", "Pedomet.pic", "reciproc.pic")
  14.   printAllCardsOnePage(filePathName, "Recorder.pic", "release.pic", "Rocket.pic", "rotisser.pic")
  15.   printAllCardsOnePage(filePathName, "screw.pic", "shearing.pic", "snorke.pic", "spotligh.pic")
  16.   printAllCardsOnePage(filePathName, "Steamcan.pic", "Tank.pic", "Viola.pic", "walkin.pic")
  17.   printAllCardsOnePage(filePathName, "Walls.pic", "wheel.pic", "windlass.pic", "wing.pic")
  18.   printAllCardsOnePage(filePathName, "woodplan.pic", "Woodwi.pic", "wormgear.pic")
  19. end
  20.  
  21. on printAllCardsOnePage filePathName, file1, file2, file3, file4
  22.   -- create the object
  23.   set printObj = printomatic(mnew)
  24.   
  25.   if not(objectP( printObj )) then
  26.     alert "Sorry...Error in printing."
  27.     exit
  28.   end if
  29.   
  30.   printobj(mSetDocumentName, "Leonardo 2")
  31.   
  32.   -- set up the new object:
  33.   -- reset to page 1
  34.   printobj(mreset)
  35.   
  36.   -- set landscape mode
  37.   printobj(msetlandscapemode, TRUE)
  38.   
  39.   set paperwidth = printobj(mgetpaperwidth)
  40.   set paperheight = printobj(mgetpaperheight)
  41.   printobj(msetmargins, 0, 0, paperwidth, paperheight)
  42.   
  43.   -- set the printable space to the margins
  44.   printobj(msetprintablemargins)
  45.   
  46.   -- set the margins to as big as possible
  47.   set pageW = printObj(mGetPageWidth)
  48.   set pageH = printObj(mGetPageheight)
  49.   
  50.   -- page footer right side
  51.   --  printObj(mSetPageNumSymbol,"▐")
  52.   --  printObj(mSetTextSize,10)
  53.   --  printObj(mSetTextStyle,"normal")
  54.   --  printObj(mDrawText, "page ▐", pageW - 10, pageH)
  55.   
  56.   set pictureFileList = getPictureFileList()
  57.   set numPictures = count(pictureFileList)
  58.   set numPages = numPictures / 4
  59.   
  60.   -- register the xobject
  61.   printObj(mRegister, "PMAT130-013-01075")
  62.   
  63.   -- start a new page
  64.   printobj(mnewpage)
  65.   
  66.   printobj(mpicture, filePathName & file1, 0, 0, pageW / 2, (pageH / 2) - 10)
  67.   printobj(mpicture, filePathName & file2, 0, pageH / 2, pageW / 2, pageH - 10)
  68.   printobj(mpicture, filePathName & file3, pageW / 2, 0, pageW, (pageH / 2) - 10)
  69.   
  70.   -- if statement for page 13 that has only 3 cards on it
  71.   if not voidP(file4) then
  72.     printobj(mpicture, filePathName & file4, pageW / 2, pageH / 2, pageW, pageH - 10)
  73.   end if
  74.   
  75.   -- print the page
  76.   printobj(mprint)
  77.   --  printObj(mprintPreview)
  78.   
  79.   -- dispose of the object
  80.   printObj(mdispose)
  81. end